/* 
 * File:   run.h
 * Author: Thomas
 *
 * Created on 19 November 2011, 01:37
 */
#include "parse.h"

void runCommand(char *tar);
/* Arguments: String to parse
 * return type: none
 * function: parses and then runs the input
 */
void execute(char **tar);
/* Arguments: Array of Strings (part of input)
 * return type: none
 * function: executes a command
 */
void fullExecute(char **orig, int start, int end);
/* Arguments: Array of Strings (Parsed input), start point of array, end point of array
 * return type: none
 * function: undergoes recursion right to left to separate blocks of commands by finding ;
 */
void fullExecuteHelper(char **tar);
/* Arguments: Array of Strings (Parsed input)
 * return type: none
 * function: initiates the recursive function fullExecute to scan the array
 */
void redirect(char **orig, int cur);
/* Arguments: Array of Strings (part of input), starting point
 * return type: none
 * function: undergoes recursion right to left to activate the symbols > , < , 2> , >> , and |
 */
void execute2(char **orig, int cur);
/* Arguments: Array of Strings (part of input), starting point
 * return type: none
 * function: forks a child process to run redirect
 */
void assessLeft(char **orig, int cur);
/* Arguments: Array of Strings (part of input), ending point
 * return type: none
 * function: executes the left side of the symbol found in redirect and recalls redirect if there is another symbol
 */
void assessRight(char **orig, int cur);
/* Arguments: Array of Strings (part of input), starting point
 * return type: none
 * function: executes the right side of the symbol found in redirect
 */

